package com.yunhe.marketing.client;

import com.yunhe.common.model.ResultObject;
import com.yunhe.marketing.client.fallback.AuthorityFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @Author: DongWenYu
 * @Date: 2021/2/23 14:26
 */
@ApiIgnore
@FeignClient(value = "yh-authority", fallbackFactory = AuthorityFallbackFactory.class)
@RequestMapping("/companys")
@Component
public interface AuthorityClient {

    /**
     * 根据统一社会信用代码获得企业
     * @param unifiedSocialCreditCode 
     * @return org.springframework.http.ResponseEntity<com.yunhe.common.model.ResultObject>
     * @create 2021/2/23 14:35
     */
    @RequestMapping(value = "/byUnifiedSocialCreditCode" , method = RequestMethod.GET)
    ResponseEntity<ResultObject> getByUnifiedSocialCreditCode(@RequestParam("unifiedSocialCreditCode") String unifiedSocialCreditCode);
}
